@{block #content}

<script type="text/javascript">
$(document).ready(function(){
    resizer("image", 97);
    $("#celebrioGalleryApp_images").css({"width" : widthCount("image")});
    
    $("#celebrioGalleryApp_images").draggable({
        'axis' : 'x',
        'distance' : 30,
        start : function (event, ui) {
            dragging = true;
        },
        stop : function () {
            setTimeout(function() {
            dragging = false;}, 200);
        	$("#celebrioGalleryApp_images").dragBack();
        }
    });	
	
	$("#celebrioGalleryApp_images").mousedown(function(){
    	$(this).stop();
    });
    
   	$(window).resize(function(){
   		resizer("image", 97);
   		$("#celebrioGalleryApp_images").css({"width" : widthCount("image")});
    	$("#celebrioGalleryApp_images").stop();
   		$("#celebrioGalleryApp_images").dragBack();
	});
	
/*    function viewImage(url) {
        var image = $("<img src='"+url+"' class='bigone'>").appendTo("body").click(
            function () {
                $(".bigone").remove();
            }
        )
        if (image.width() > image.height()) {
            origw = image.width();
            neww = $(window).width();
            if (neww < origw) {
                image.width(neww);
                image.height(image.height() * (neww / origw));
            }
        } else {
            origh = image.height();
            newh = $(window).height();
            if (newh < origh) {
                image.height(newh);
                image.width(image.width() * (newh / origh));
            }
        }
        image.css({ position:'absolute', left:0, top:0 })
        return false;
    }*/
});
</script>
<!--
<div id="celebrioGalleryApp_test">
	<div id="celebrioGalleryApp_test_text">This view is only a draft (no functions enabled), sorry for any bugs :)</div>
</div>-->

<div id="celebrioGalleryApp_images">
	{var $counter 1}
    {foreach $images as $image}
	<div id="image{$counter}" class="celebrioGalleryApp_image">
        <img src="{$image->getPictureUrl()}"/>
        <div id="image{$counter++}_description" class="celebrioGalleryApp_image_description">
        	
        </div>
    </div>
    {/foreach}
</div>

{/block}